<?php 
$staffPermission = $_SESSION['STAFF_PERMISSTION'];
?>
<script type="text/javascript">
	if (typeof(Public) != 'function'){
		var arr = <?= ($this->arrJsCss != '')?$this->arrJsCss:"''"?>;			
		loadfileJsCss(arr);
	}		

</script>
<div id = "IndexFrm" class="content-view">
<form action="index" method="POST" id="frmAllListType">
<!--Sinh mot hidden luu list ID ma NSD chon!-->
<?php
echo $this->formHidden("hdn_current_page",$this->iCurrentPage,null); 
echo $this->formHidden("hdn_record_number_page",$this->iNumberRecordPerPage,null);  
echo $this->formHidden("hdn_object_id_list","",null);
// Sinh mot hidden luu gia tri cua so thu tu sap xep lon nhat hien thoi
echo $this->formHidden("hdn_order",$this->iCountElement + 1,null);
// Sinh mot hidden luu gia tri id cua Loai danh muc duoc chon de edit
echo $this->formHidden("hdn_listtype_id","",null); 
echo $this->formHidden("filexml",$this->filexml,null); 
?>	

<input type = "hidden" name = "showLeftMenu" id = "showLeftMenu" />
	<div class = "searh-fixed" style="width: 1151px;">			
		<div class = "normal_title">
			<?=$this->bodyTitle;?>
		</div>	
		<!--Màn hình tìm kiếm!-->
		<div class="search-container">
			<div class = "search-item">
				<?=$this->formText('txtSearch',$this->listTypeName,array('size'=>99,'class'=>'textbox','optional'=>false,'message'=>'Ma LOAI DANH MUC khong duoc de trong!'));?>&nbsp;	
			</div>
		</div>	
		<div class = "button-link-container" align = "right">
			<div class = "blc-left">
				<input name = "btn_filter" id = "btn_filter" type="button" value="Tìm kiếm" class="link-button clsearch">
				<div style = "display:inline-block;width:25px;">
					<img id = "isearching" src = "<?=$this->baseUrl()?>/public/images/searching.gif" style = "display:none;vertical-align: middle;">
				</div>
			</div>
			<div class = "blc-right">
				<?php if($staffPermission == 'ADMIN_SYSTEM'){?>
				<input name = "btn_add" id = "btn_add" type="button" value="Thêm" class="link-button cladd">
				<input name = "btn_edit" id = "btn_edit" type="button" value="Sửa" class="link-button cledit">
				<input name = "btn_delete" id = "btn_delete" type="button" value="Xóa" class="link-button cldelete">
				<?}?>
				<input type="button" class="link-button clxml" value="Xuất Xml">
			</div>		
		</div>
	</div>
	<!-- Màn hình danh sách -->
	<div id = "table-container"></div>
	<!-- Phân trang dữ liệu -->
	<table class="table-page-number" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td class = "left-col small_label" valign="top">
				<small class="small_starmark" id = "sdocpertotal"></small>
			</td>
			<td class = "center-col" align="center" id = "generateStringNumberPage"></td>
			<td class = "right-col normal_label" id = "generateHtmlSelectBoxPage">Hiển thị <select class='textbox' id = 'cbo_nuber_record_page' name='cbo_nuber_record_page' optional='true' style='width:60' onChange='myClassPublic.changeNumberRowPerPageModal(this)'><?php 
				echo Efy_Library::_generateSelectOption($this->arrListItem, 'C_CODE', 'C_CODE', 'C_NAME', $this->arrListItem[0]);
			?></select>Hồ sơ/1 trang</td>
		</tr>
	</table>
	<!-- Các tùy chọn -->
	<div class = "button-container">
		<?php if($staffPermission == 'ADMIN_SYSTEM'){?>
		<input name = "btn_add" id = "btn_add" type="button" value="Thêm" class="link-button cladd">	
		<input type="button" class="link-button cledit" value="Sửa">
		<input name = "btn_delete" id = "btn_delete" type="button" value="Xóa" class="link-button cldelete">
		<?}?>
		<input type="button" class="link-button clxml" value="Xuất Xml">	
	</div>
</form>
</div>
<div id="UpdateFrm"></div>

<script type="text/javascript">
	$(document).ready(function(){
		fixTitle();
	});
	baseUrl = '<?=$this->baseUrl();?>';
	var objXmlTemp = '';
		if(typeof(myPublic) === 'undefined'){						
			var myPublic = new Public(baseUrl,'listxml','listtype',objXmlTemp);			
		}else{			
			objXmlTemp = myPublic.efyXmllisttype;			
			var myPublic = new Public(baseUrl,'listxml','listtype',objXmlTemp);
		}	
	myPublic.ldmod();
	myPublic.loadIndexfrm();
</script>